The present invention relates generally to systems running applications that benefit from the incorporation of physics-based animations or physics data. More particularly, the present invention relates to software package structures and operating methodologies for Physics Processing Unit (PPU) enhanced systems.
Historically, the demand for realistic looking, physics-based animations has been met to a limited degree by so-called physics engines which supplement the programming code used to implement conventional applications. Indeed, a market has recently emerged directed to the development of physics engines or so-called “physics middleware.”
Conventional software based physics engines allow programmers increased latitude to assign virtual mass and coefficients of friction to objects animated within the execution of the main application. Similarly, virtual forces, impulses, and torques may be applied to objects. In effect, software-based physics engines provide programmers with a library of procedures to simplify the visual creation of scenes having physics-based interaction between objects.
Unfortunately, the growing appetite for animated realism in applications can not be met by merely providing additional specialty software, and thereby layering upon the CPU additional processing requirements. This is true regardless of the relative sophistication of the specialty software.
As a result, PPU enhanced systems have recently been developed. Systems readily adapted to PPU enhancement include, as examples, Personal Computers (PCs) and game consoles. Generally speaking, the performance capabilities of a conventional Central Processing Unit (CPU), such as a Pentium® or similar microprocessor, is enhanced by the additional provision of a PPU. Several exemplary embodiments of basic, PPU-enhanced system are disclosed in related U.S. patent applications Ser. No. 10/715,459 filed Nov. 19, 2003 and Ser. No. 10/839,155 filed May 6, 2004.
The term “PPU-enhanced” generally describes any system incorporating a PPU to generate physics data for consumption by a main application running on a CPU. “Physics data” comprises any data or data structure related to a mathematical algorithm or logical/mathematical expression adapted to solve a physics problem or express a physics relationship.
Any set of logical computations or algorithms operating upon physics data is termed a physics “simulation.” A simulation generally runs on the PPU in cooperation with the CPU to generate a body of physics data that accurately defines the movement and/or interaction of objects and features in an animated scene displayed by a peripheral device associated with the system. So, in one sense the physics simulation run on the PPU can be said to visually enhance the animation of a scene generated by the main application running on the CPU.
Such computationally derived physical animations form an increasingly important aspect of numerous applications. Computer games are an excellent example of applications that benefit from the added realism of animations derived from a defined set of physics-based inputs, parameters, and data. The term “animation” is used here to generally describe any visual representation of an event. The term “physics-based animation” refers to any animation derived, at least in part, from one or more computational processes operating upon physics data that defines a physical characteristic or behavior. A simulation is often said to drive the resulting animation. However, the direct relationship between simulation and animation, and the fact that the underlying simulation is not apparent to the system user typically results in an alternative use for the terms animation and simulation.
Cutting edge applications generally demand that physics-based animations, and the underlying simulations run in real-time. This requirement poses a significant problem for conventional systems. For example, conventional PCs are able to resolve only a limited amount of physics data in the time allowed by real time animation frame rates. This disability arises from structural limitations in the CPU architecture, data transfer bandwidth limitations, and the computational workload placed upon the CPU by other processes inherent in the execution of the main application.
For clarity of reference, the term “system” subsumes the term “host system.” A system may include a PPU, whereas the term “host system” generally refers to the combination of at least a CPU and an associated main memory. This combination of “host system” elements interacts with the PPU in a system.
PPU enhanced system resources typically brought to bear on the problem of a physics-based animation are conceptually illustrated in FIG. 1. In FIG. 1, CPU 1 together with its associated drivers and internal memories, access data from a main system memory 2, and/or one or more peripheral devices 3. A Graphics Processing Unit (GPU) 4 with its associated memory 4A and a PPU 5 with its associated memory 5A, send data to and receive data from main memory 2.
Specific memory architectures are legion in number. The term “main memory” generally refers to any collection of data storage elements associated with the CPU and typically includes at least various types of Random Access Memory (RAM), related data registers, caches, and buffers.
A main application 7 is typically loaded from a peripheral 3 and runs, at least in part, from main memory 2 using CPU resources. Many contemporary applications include significant graphics content and are intended to run with the aid of separate GPU 4. GPUs are well know in the industry and are specifically designed to run in cooperation with a CPU to create (or “render”) animations having a three dimensional (3-D) quality. As a result, main application 7 accesses one or more graphical rendering subroutines associated with GPU 4 using an Application Programming Interface (API) and related drivers 9. Similarly, one or more physics subroutines associated with PPU 5 are accessed using a PPU API and related drivers 8.
An API is a well understood programming technique used to establish a lexicon of command instructions by which one piece of software may “call” another piece of software. The term “call” as variously used hereafter broadly describes any interaction by which one piece of software causes the retrieval, storage, indexing, update, etc., of another piece of software, or the execution of a computational process in firmware or hardware. The term “run” describes any process in which hardware resources act upon data under the direction of a software resource.
PPU enhancement of a system implicates a number of changes in the way application software and related physics routines are defined and implemented. Non-PPU enhanced systems have the luxury of a single computational platform synchronously executing both application and related physics middleware. This is not the case for PPU enhanced systems. Thus, new approaches to the definition and operation of software components is required.